<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-stpm v1.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../../css/font.css">
    <link rel="stylesheet" href="../../css/xadmin.css">
    <link rel="stylesheet" href="../../css/formSelects-v4.css">
    <script src="../../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../../js/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../../js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="x-nav">
			<span class="layui-breadcrumb">
            <a href="javascript:;">首页</a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div style="padding-top: 15px">
    <div class="layui-row layui-col-space15">
        <!--左边-->
        <div class="layui-row layui-col-space15 layui-col-md8">
            <!--项目统计-->
            <div class="layui-col-md12">
                <!--项目名列表-->
                <div class="layui-col-md2">
                    <div class="layui-card" style="height: 280px;">
                        <div class="layui-card-header">
                            <h3>项目统计</h3>
                        </div>
                        <div class="layui-card-body">
                            <table class="layui-table" lay-skin="nob">
                                <tbody id="containter">
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!--点击项目后的详情-->
                <div class="layui-col-md7">
                    <div class="layui-card" style="height: 280px;">
                        <div class="layui-card-header"></div>
                        <div class="layui-card-body ">
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-md12 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3 id="projectName_h3"></h3>
                                        <div class="layui-progress" lay-filter="progressDemo" lay-showPercent="true">
                                            <div class="layui-progress-bar" lay-percent="100.00%"></div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                            <ul class="layui-row layui-col-space15 layui-this x-admin-carousel x-admin-backlog" style="text-align: center">
                                <li class="layui-col-md4">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>预计/小时</h3>
                                        <p><cite id="projectTotalHours">0</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md4 ">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>消耗/小时</h3>
                                        <p><cite id="projectUsedHours">0</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md4">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>剩余/小时</h3>
                                        <p><cite id="projectLeftHours">0</cite></p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!--查看所有项目-->
                <div class="layui-col-md3">
                    <div class="layui-card" style="height: 280px;">
                        <div class="layui-card-header">
                            <!--<button class="layui-btn layui-btn-fluid layui-btn-radius ">所有项目-></button>-->
                            <div style="float: right">
                                <a onclick="xadmin.open('查看所有项目','./project-list.html')" class="layui-btn layui-btn-radius layui-btn-xs">
                                    <cite title="查看所有项目">查看所有项目</cite>
                                </a>
                            </div>
                        </div>
                        <div class="layui-card-body" style="float: right">
                            <!--单独显示所有项目-->
                            <div class="layui-col-md12">
                                <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog" >
                                    <li class="layui-col-md12">
                                        <a href="javascript:;" class="x-admin-backlog-body" style="height: 180px;display: table-cell;vertical-align: middle;text-align: center">
                                            <h3>所有项目</h3>
                                            <p><cite id="totalProject"></cite></p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <!--显示所有项目的情况-->
                            <!--<div class="layui-col-md9">-->
                                <!--<ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog" >-->
                                    <!--<li class="layui-col-md12 layui-col-xs6">-->
                                        <!--<a href="javascript:;" class="x-admin-backlog-body">-->
                                            <!--<h3>未完成</h3>-->
                                            <!--<div class="layui-progress" lay-showpercent="true">-->
                                                <!--<div class="layui-progress-bar" lay-percent="70%"></div>-->
                                            <!--</div>-->
                                        <!--</a>-->
                                    <!--</li>-->
                                    <!--<li class="layui-col-md12 layui-col-xs6">-->
                                        <!--<a href="javascript:;" class="x-admin-backlog-body">-->
                                            <!--<h3>进行中</h3>-->
                                            <!--<div class="layui-progress" lay-showpercent="true">-->
                                                <!--<div class="layui-progress-bar" lay-percent="70%"></div>-->
                                            <!--</div>-->
                                        <!--</a>-->
                                    <!--</li>-->
                                    <!--<li class="layui-col-md12 layui-col-xs6">-->
                                        <!--<a href="javascript:;" class="x-admin-backlog-body">-->
                                            <!--<h3>已完成</h3>-->
                                            <!--<div class="layui-progress" lay-showpercent="true">-->
                                                <!--<div class="layui-progress-bar" lay-percent="70%"></div>-->
                                            <!--</div>-->
                                        <!--</a>-->
                                    <!--</li>-->
                                <!--</ul>-->
                            <!--</div>-->
                        </div>
                    </div>
                </div>
            </div>

            <!--进行中的项目-->
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">
                        <h3>进行中的项目</h3>
                    </div>
                    <div class="layui-card-body">
                        <table class="layui-hide" id="projectTable" lay-filter="projectTable"></table>
                        <script type="text/html" id="processTpl">
                             <div class="layui-progress" lay-showpercent="true" style="margin-top: 15px">
                                 <div class="layui-progress-bar" lay-percent="{{d.projectProcess+'%'}}"></div>
                             </div>
                        </script>
                        <script type="text/html" id="barDemo">
                            <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="start">开始</a>
                            <a class="layui-btn layui-btn-xs" lay-event="finish">完成</a>
                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                        </script>
                    </div>
                </div>
            </div>
        </div>
        <!--右边-->
        <div class="layui-row layui-col-space15 layui-col-md4">
            <!--项目总览-->
            <div class="layui-col-md12">
                <div class="layui-col-md12">
                    <div class="layui-card" style="height: 280px">
                        <!--头部，左右布局-->
                        <div class="layui-card-header">
                            <div style="float: left">
                                <h3>任务总览</h3>
                            </div>
                            <div style="float: right;">
                                <a class="layui-btn layui-btn-sm" onclick="xadmin.open('任务列表','../task/task-list.html')">
                                    <i class="layui-icon layui-icon-list" title="任务列表"></i>
                                </a>
                            </div>
                        </div>
                        <!--主体部分-->
                        <div class="layui-card-body">
                            <table class="layui-hide" id="taskTable" lay-filter="taskTable"></table>
                        </div>
                    </div>
                </div>
            </div>
            <!--指派给我的任务-->
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">
                        <div style="float: left;">
                            我的团队
                        </div>
                        <div style="float: right;">
                            <a class="layui-btn" onclick="xadmin.open('团队列表','../team/team-list.html')">
                                <i class="layui-icon layui-icon-group" title="团队列表"></i>
                            </a>
                        </div>
                    </div>
                    <div class="layui-card-body">
                        <table class="layui-hide" id="teamTable" lay-filter="teamTable"></table>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
<script>
    layui.use(['laydate', 'form', 'laypage', 'layer', 'table', 'element'], function() {
        var laydate = layui.laydate;
        var form = layui.form;
        var laypage = layui.laypage;
        var layer = layui.layer;
        var table = layui.table;
        var element = layui.element;
        var formSelects = layui.formSelects;
        var $=layui.jquery;
        var projectAdd,projectEdit,teamAdd,teamEdit,taskAdd,taskEdit;
        var projectName,projectCode;
        var projectList=[];//获取项目信息列表作为全局变量
        var totalProject,role;

        var teamProject,teamStatus;
        var taskProject,taskPriority;
        var taskId;
        //获取单选框的值
        form.on('select(teamProjectSelect)',function (data) {
            teamProject=data.value;
        });
        form.on("radio(teamStatus)",function (data) {
            teamStatus=data.value;
        });
        form.on("select(taskProjectSelect)",function (data) {
            taskProject=data.value;
        });
        form.on("select(taskPrioritySelect)",function (data) {
            taskPriority=data.value;
        });
        form.on("select(taskPrioritySelect_edit)",function (data) {
            taskPriority=data.value;
        });
        laydate.render({
            elem:'#projectStartDate'
            ,type: 'datetime'
        });
        laydate.render({
            elem:'#projectEndDate'
            ,type: 'datetime'
        });
        laydate.render({
            elem:'#projectStartDate_edit'
            ,type: 'datetime'
        });
        laydate.render({
            elem:'#projectEndDate_edit'
            ,type: 'datetime'
        });
        laydate.render({
            elem:'#taskStartDate'
            ,type:'datetime'
        });
        laydate.render({
            elem:'#taskEndDate'
            ,type:'datetime'
        });
        laydate.render({
            elem:'#taskStartDate_edit'
            ,type:'datetime'
        });
        laydate.render({
            elem:'#taskEndDate_edit'
            ,type:'datetime'
        });


        //进行中的项目表
        table.render({
            elem:'#projectTable'
            ,id:'projectTable'
            , height: 300
            ,url: 'http://localhost:8080/project/list' //数据接口
            , title: '项目表'
            , page: true //开启分页
            , toolbar: "default" //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
            ,defaultToolbar:['filter', 'exports']
            // , totalRow: true //开启合计行
            ,cols: [[
                {type: 'radio', fixed: 'left'}
                ,{field:'projectCode',minWidth: 80,title:'代号',sort:true}
                ,{field:'id',minWidth: 80,title:'ID',hide:true}
                ,{field:'role',minWidth: 80,title:'role',hide:true}
                ,{field:'projectName',width:'20%',minWidth: 80,title:'项目名称',sort:true}
                ,{field:'projectEndDate',minWidth: 100,title:'截止时间',sort:true}
                ,{field:'projectStatus',minWidth: 80,title:'状态',sort:true}
                ,{field:'totalHours',minWidth: 80,title:'预计',sort:true}
                ,{field:'usedHours',minWidth: 80,title:'消耗',sort:true}
                ,{field:'leftHours',minWidth: 80,title:'剩余',sort:true}
                ,{field:'projectProcess',width:'15%',minWidth: 80,title:'进度',sort:true,templet:'#processTpl',unresize: true}
                ,{fixed: 'right', width: '30%', minWidth: 100, align: 'center', toolbar: '#barDemo'
                }
            ]]
            ,done:function (res, curr, count) {
                element.init();
                projectName=res.data.projectName;
                projectCode=res.data.projectCode;
                projectList=res.data;
                totalProject=count;
                if(projectList.length!=0) {
                    role = projectList[0].role;
                }
                console.log('role '+projectList[0].role);
                reloadDom();
            }
        });
        //创建团队表
        table.render({
            elem: '#teamTable'
            ,url: 'http://localhost:8080/team/list'
            ,id:'teamTable'
            , height: 200
            , title: '团队表'
            , page: true //开启分页
            , toolbar: "default" //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
            ,defaultToolbar:['filter', 'exports']
            ,cols: [[
                {type: 'radio'}
                ,{field:'teamName',width:'40%',minWidth: 80,title:'团队名',sort:true}
                ,{field:'teamProject',width: '40%', minWidth: 100,title:'所属项目',sort:true}
                ,{field:'teamStatus',minWidth: 80,title:'状态',sort:true}
            ]]
        });

        //创建任务表
        table.render({
            elem: '#taskTable'
            ,url: 'http://localhost:8080/task/list'
            ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增,
            , height: 200
            , title: '任务表'
            , page: true //开启分页
            , toolbar: "default" //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
            ,defaultToolbar:['filter', 'exports']
            ,cols: [[
                {type: 'radio', fixed: 'left'}
                ,{field:'taskName',width:'40%',minWidth: 80,title:'任务名',sort:true}
                ,{field:'id',width:'40%',minWidth: 80,title:'ID',hide:true}
                ,{field:'taskProjectCode',width: '40%', minWidth: 100,title:'项目代号',sort:true}
                ,{field:'taskAssginedTo',minWidth: 80,title:'指派给',sort:true}
                ,{field:'taskDesc',minWidth: 80,title:'描述',hide:true}
            ]]
        });

        //监听项目表头工具栏事件
        table.on('toolbar(projectTable)', function (obj) {
            if(role!='项目经理'){
                layer.msg('添加项目只能由项目经理完成，当前角色：'+role, {
                    icon: 5,
                    time:2000
                });
            }else {
                var checkStatus = table.checkStatus(obj.config.id),
                    data = checkStatus.data; //获取选中的数据
                switch (obj.event) {
                    case 'add':
                        // xadmin.open('创建项目','./project-add.html');
                        projectAdd = layer.open({
                            type: 1,
                            title: '添加项目',
                            area: ['600px', '500px'],
                            content: $('#project_add')
                        });
                        break;
                    case 'update':
                        if (data.length === 0) {
                            layer.msg('请选择一行');
                        } else if (data.length > 1) {
                            layer.msg('只能同时编辑一个');
                        } else {
                            // xadmin.open('修改选中的项目','./project-edit.html');
                            laydate.render({
                                elem: '#projectStartDate_edit'
                                , type: 'datetime'
                                , value: data[0].projectStartDate
                                , isInitValue: true
                            });
                            laydate.render({
                                elem: '#projectEndDate_edit'
                                , type: 'datetime'
                                , value: data[0].projectEndDate
                                , isInitValue: true
                            });
                            $("#projectName_edit").val(data[0].projectName);
                            $("#projectCode_edit").val(data[0].projectCode);
                            $("#projectDesc_edit").val(data[0].projectDesc);
                            projectEdit = layer.open({
                                type: 1,
                                title: '修改用户',
                                area: ['600px', '500px'],
                                content: $('#project_edit')
                            });
                        }
                        break;
                }
                ;
            }
        });

        //监听项目表行工具事件
        table.on('tool(projectTable)', function (obj) { //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            if(role!='项目经理'){
                layer.msg('项目的操作只能由项目经理完成，当前角色：'+role, {
                    icon: 5,
                    time:2000
                });
            }else {
                var data = obj.data; //获得当前行数据
                var layEvent = obj.event; //获得 lay-event 对应的值
                if (layEvent === 'start') {
                    // xadmin.open('查看选中的事项','./todo-content.html');
                    if (data.projectStatus == "进行中" || data.projectStatus == "已完成") {
                        layer.msg('已经开始或完成的项目不能开始', {
                            icon: 5,
                            time: 2000
                        });
                    } else {
                        var myDate = new Date();
                        //获取当前时间并格式化yyyy-MM-dd HH:mm:ss
                        var nowDate = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" +
                            myDate.getDate() + " " + myDate.getHours() + ":" + myDate.getMinutes() + ":" + myDate.getSeconds();
                        data.projectStartDate = nowDate;
                        layer.msg(nowDate);
                        $.ajax({
                            url: 'http://localhost:8080/project/start',
                            data: data,
                            contentType: "application/x-www-form-urlencoded",
                            type: 'POST',
                            xhrFields: {
                                withCredentials: true
                            },
                            success: function (data) {
                                if (data.status == "success") {
                                    layer.msg('设置成功', {
                                        icon: 1,
                                        time: 2000
                                    }, function () {
                                        //添加用户成功后关闭弹窗并刷新
                                        table.reload('projectTable', {
                                            url: 'http://localhost:8080/project/list'
                                        })
                                    });
                                } else {
                                    layer.msg(data.data.errMsg, {
                                        icon: 5,
                                        time: 1000
                                    });
                                }
                            }
                        });
                        return false;
                    }
                }
                else if (layEvent === 'finish') {
                    // xadmin.open('编辑当前项目','./project-edit.html');
                    if (data.projectStatus != "进行中") {
                        layer.msg('只能完成进行中的项目', {
                            icon: 5,
                            time: 2000
                        });
                    } else {
                        var myDate = new Date();
                        //获取当前时间并格式化yyyy-MM-dd HH:mm:ss
                        var nowDate = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" +
                            myDate.getDate() + " " + myDate.getHours() + ":" + myDate.getMinutes() + ":" + myDate.getSeconds();
                        data.projectEndDate = nowDate;
                        // layer.msg(nowDate);
                        $.ajax({
                            url: 'http://localhost:8080/project/finish',
                            data: data,
                            contentType: "application/x-www-form-urlencoded",
                            type: 'POST',
                            xhrFields: {
                                withCredentials: true
                            },
                            success: function (data) {
                                if (data.status == "success") {
                                    layer.msg('设置成功', {
                                        icon: 1,
                                        time: 2000
                                    }, function () {
                                        //添加用户成功后关闭弹窗并刷新
                                        table.reload('projectTable', {
                                            url: 'http://localhost:8080/project/list'
                                        })
                                    });
                                } else {
                                    layer.msg(data.data.errMsg, {
                                        icon: 5,
                                        time: 1000
                                    });
                                }
                            }
                        });
                        return false;
                    }
                }
                else if (layEvent === 'del') {
                    // xadmin.open('修改选中的事项','./todo-edit.html');
                    layer.confirm('删除后将不可恢复', {icon: 3, title: '提示'}, function (index) {
                        obj.del();
                        layer.close(index);
                        $.ajax({
                            url: 'http://localhost:8080/project/delete',
                            data: data,
                            contentType: "application/x-www-form-urlencoded",
                            type: 'POST',
                            xhrFields: {
                                withCredentials: true
                            },
                            success: function (data) {
                                if (data.status == "success") {
                                    layer.msg('删除成功', {
                                        icon: 1,
                                        time: 2000
                                    }, function () {
                                        //添加用户成功后关闭弹窗并刷新
                                        layer.close(index);
                                        table.reload('projectTable', {
                                            url: 'http://localhost:8080/project/list'
                                        })
                                    });
                                } else {
                                    layer.msg(data.data.errMsg, {
                                        icon: 5,
                                        time: 1000
                                    });
                                }
                            }
                        });
                        return false;
                    });
                }
            }
        });

        //监听团队头工具栏事件
        table.on('toolbar(teamTable)', function (obj) {
            if(role!='项目经理'){
                layer.msg('团队添加只能由项目经理完成，当前角色：'+role, {
                    icon: 5,
                    time:2000
                });
            }else {
                var checkStatus = table.checkStatus(obj.config.id),
                    data = checkStatus.data; //获取选中的数据
                switch (obj.event) {
                    case 'add':
                        // xadmin.open('创建团队','../team/team-add.html');
                        //多选下拉框
                        // formSelects.data('programerSelect', 'server', {
                        //     url: 'http://localhost:8080/user/programer',
                        //     keyword: 'name'
                        // });
                        formSelects.data('developerSelect', 'server', {
                            url: 'http://localhost:8080/user/developer',
                            keyword: 'name'
                        });
                        formSelects.data('testerSelect', 'server', {
                            url: 'http://localhost:8080/user/tester',
                            keyword: 'name'
                        });
                        formSelects.render();
                        //单选下拉框
                        for (var i = 0; i < projectList.length; i++) {
                            $('#teamProject').append("<option value=" + projectList[i].projectCode + ">" + projectList[i].projectCode + "</option>")
                        }
                        form.render('select');
                        teamAdd = layer.open({
                            type: 1,
                            title: '添加团队',
                            area: ['600px', '500px'],
                            content: $('#team_add')
                        });
                        break;
                    case 'update':
                        if (data.length === 0) {
                            layer.msg('请选择一行');
                        } else if (data.length > 1) {
                            layer.msg('只能同时编辑一个');
                        } else {
                            // xadmin.open('修改选中的团队','../team/team-edit.html');
                            $('#teamProject_edit').val(data[0].teamProject);
                            $('#teamName_edit').val(data[0].teamName);
                            $('#teamDesc_edit').val(data[0].teamDesc);
                            formSelects.data('programerSelect_edit', 'server', {
                                url: 'http://localhost:8080/user/programer',
                                keyword: 'name'
                            });
                            formSelects.data('developerSelect_edit', 'server', {
                                url: 'http://localhost:8080/user/developer',
                                keyword: 'name'
                            });
                            formSelects.data('testerSelect_edit', 'server', {
                                url: 'http://localhost:8080/user/tester',
                                keyword: 'name'
                            });
                            formSelects.render();
                            teamEdit = layer.open({
                                type: 1,
                                title: '修改团队信息',
                                area: ['600px', '500px'],
                                content: $('#team_edit')
                            });
                        }
                        break;
                }
                ;
            }
        });

        //监听任务头工具栏事件
        table.on('toolbar(taskTable)', function (obj) {
            if(role!='项目经理'){
                layer.msg('添加任务只能由项目经理完成，当前角色：'+role, {
                    icon: 5,
                    time:2000
                });
            }else {
                var checkStatus = table.checkStatus(obj.config.id),
                    data = checkStatus.data; //获取选中的数据
                switch (obj.event) {
                    case 'add':
                        // xadmin.open('创建任务','../task/task-add.html');
                        formSelects.data('assginedToSelect', 'server', {
                            // url: 'http://localhost:8080/team/name',
                            url: 'http://localhost:8080/user/devtest',
                            keyword: 'name'
                        });
                        formSelects.render();
                        for (var i = 0; i < projectList.length; i++) {
                            $('#taskProject').append("<option value=" + projectList[i].projectCode + ">" + projectList[i].projectCode + "</option>")
                        }
                        form.render('select');
                        taskAdd = layer.open({
                            type: 1,
                            title: '添加任务',
                            area: ['600px', '500px'],
                            content: $('#task_add')
                        });
                        break;
                    case 'update':
                        if (data.length === 0) {
                            layer.msg('请选择一行');
                        } else if (data.length > 1) {
                            layer.msg('只能同时编辑一个');
                        } else {
                            // xadmin.open('修改选中的任务','../task/task-edit.html');
                            $("#taskProject_edit").val(data[0].taskProjectCode);
                            $("#taskName_edit").val(data[0].taskName);
                            $("#taskDesc_edit").val(data[0].taskDesc);
                            taskId = data[0].id;
                            formSelects.data('assginedToSelect_edit', 'server', {
                                url: 'http://localhost:8080/user/devtest',
                                keyword: 'name'
                            });
                            formSelects.render();
                            taskEdit = layer.open({
                                type: 1,
                                title: '修改任务信息',
                                area: ['600px', '500px'],
                                content: $('#task_edit')
                            });
                        }
                        break;
                }
                ;
            }
        });

        form.on('submit(create_project)',function (obj) {
            var field = obj.field;
            form.on('select(projectPriority)',function (data) {
                field.projectPriority=data.value;
            });
            form.on('select(projectHours)',function (data) {
                field.projectHours=data.value;
            });
            $.ajax({
                url: 'http://localhost:8080/project/create',
                data: field,
                contentType: "application/x-www-form-urlencoded",
                type: 'POST',
                xhrFields: {
                    withCredentials: true
                },
                success: function(data) {
                    if(data.status == "success") {
                        layer.msg('创建成功', {
                            icon: 1,
                            time: 2000
                        }, function() {
                            //添加用户成功后关闭弹窗并刷新
                            layer.close(projectAdd);
                            table.reload('projectTable',{
                                url:'http://localhost:8080/project/list'
                            })
                        });
                    } else {
                        layer.msg(data.data.errMsg, {
                            icon: 5,
                            time:1000
                        });
                    }
                },
                error: function(xhr) {
                    console.log('error');
                    console.log(xhr);
                    layer.msg('请按F12查看控制台信息', {
                        icon: 5,
                        time:1000
                    });
                }
            });
            return false;
        })

        form.on("submit(edit_project)",function (obj) {
            //获取表单数据
            var field = obj.field;
            form.on('select(projectPriority)',function (data) {
                field.projectPriority=data.value;
            });
            form.on('select(projectHours)',function (data) {
                field.projectHours=data.value;
            });
            $.ajax({
                url: 'http://localhost:8080/project/update',
                data: field,
                contentType: "application/x-www-form-urlencoded",
                type: 'POST',
                xhrFields: {
                    withCredentials: true
                },
                success: function(data) {
                    if(data.status == "success") {
                        layer.msg('注册成功', {
                            icon: 1,
                            time: 2000
                        }, function() {
                            //添加用户成功后关闭弹窗并刷新
                            layer.close(projectEdit);
                            table.reload('projectTable',{
                                url:'http://localhost:8080/project/list'
                            })
                        });
                    } else {
                        layer.msg(data.data.errMsg, {
                            icon: 5,
                            time:1000
                        });
                    }
                },
                error: function(xhr) {
                    console.log('error');
                    console.log(xhr);
                    layer.msg('请按F12查看控制台信息', {
                        icon: 5,
                        time:1000
                    });
                }
            });
            return false;
        })

        form.on("submit(edit_team)",function (obj) {
            //获取表单数据
            var field = obj.field;
            field.programerSelect_edit=formSelects.value('programerSelect_edit','valStr');
            field.developerSelect_edit=formSelects.value('developerSelect_edit','valStr');
            field.testerSelect_edit=formSelects.value('testerSelect_edit','valStr');
            field.type_edit=$('#teamStatus_edit input[name="type_edit"]:checked ').val()
            $.ajax({
                url: 'http://localhost:8080/team/update',
                data: field,
                contentType: "application/x-www-form-urlencoded",
                type: 'POST',
                xhrFields: {
                    withCredentials: true
                },
                success: function(data) {
                    if(data.status == "success") {
                        layer.msg('修改团队信息成功', {
                            icon: 1,
                            time: 2000
                        }, function() {
                            //添加用户成功后关闭弹窗并刷新
                            layer.close(teamEdit);
                            table.reload('teamTable',{
                                url:'http://localhost:8080/team/list'
                            })
                        });
                    } else {
                        layer.msg(data.data.errMsg, {
                            icon: 5,
                            time:1000
                        });
                    }
                },
                error: function(xhr) {
                    console.log('error');
                    console.log(xhr);
                    layer.msg('请按F12查看控制台信息', {
                        icon: 5,
                        time:1000
                    });
                }
            });
            return false;
        });

        form.on("submit(create_team)",function (obj) {
            //获取表单数据
            var field = obj.field;
            field.teamProject=teamProject;
            //获取多选下拉框的值
            // field.programerSelect=formSelects.value('programerSelect','valStr');
            field.developerSelect=formSelects.value('developerSelect','valStr');
            field.testerSelect=formSelects.value('testerSelect','valStr');
            //获取单选框的值
            // field.type_edit=$('#teamStatus_edit input[name="type_edit"]:checked ').val()
            field.teamStatus=teamStatus;
            $.ajax({
                url: 'http://localhost:8080/team/create',
                data: field,
                contentType: "application/x-www-form-urlencoded",
                type: 'POST',
                xhrFields: {
                    withCredentials: true
                },
                success: function(data) {
                    if(data.status == "success") {
                        layer.msg('创建团队成功', {
                            icon: 1,
                            time: 2000
                        }, function() {
                            //添加用户成功后关闭弹窗并刷新
                            layer.close(teamAdd);
                            table.reload('teamTable',{
                                url:'http://localhost:8080/team/list'
                            })
                        });
                    } else {
                        layer.msg(data.data.errMsg, {
                            icon: 5,
                            time:2000
                        });
                    }
                }
            });
            return false;
        });

        form.on("submit(create_task)",function (obj) {
            //获取表单数据
            var field = obj.field;
            field.taskProject=taskProject;
            field.taskPriority=taskPriority;
            //获取多选下拉框的值
            field.assginedToSelect=formSelects.value('assginedToSelect','valStr');
            //获取单选框的值
            // field.type_edit=$('#teamStatus_edit input[name="type_edit"]:checked ').val()
            $.ajax({
                url: 'http://localhost:8080/task/create',
                data: field,
                contentType: "application/x-www-form-urlencoded",
                type: 'POST',
                xhrFields: {
                    withCredentials: true
                },
                success: function(data) {
                    if(data.status == "success") {
                        layer.msg('创建任务成功', {
                            icon: 1,
                            time: 2000
                        }, function() {
                            //添加用户成功后关闭弹窗并刷新
                            layer.close(taskAdd);
                            table.reload('taskTable',{
                                url:'http://localhost:8080/task/list'
                            })
                        });
                    } else {
                        layer.msg(data.data.errMsg, {
                            icon: 5,
                            time:2000
                        });
                    }
                }
            });
            return false;
        });

        form.on("submit(edit_task)",function (obj) {
            //获取表单数据
            var field = obj.field;
            field.taskPriority_edit=taskPriority;
            field.id=taskId;
            //获取多选下拉框的值
            field.assginedToSelect_edit=formSelects.value('assginedToSelect_edit','valStr');
            //获取单选框的值
            // field.type_edit=$('#teamStatus_edit input[name="type_edit"]:checked ').val()
            $.ajax({
                url: 'http://localhost:8080/task/update',
                data: field,
                contentType: "application/x-www-form-urlencoded",
                type: 'POST',
                xhrFields: {
                    withCredentials: true
                },
                success: function(data) {
                    if(data.status == "success") {
                        layer.msg('修改任务成功', {
                            icon: 1,
                            time: 2000
                        }, function() {
                            //添加用户成功后关闭弹窗并刷新
                            layer.close(taskEdit);
                            table.reload('taskTable',{
                                url:'http://localhost:8080/task/list'
                            })
                        });
                    } else {
                        layer.msg(data.data.errMsg, {
                            icon: 5,
                            time:2000
                        });
                    }
                }
            });
            return false;
        });

        function reloadDom() {
            document.getElementById("projectTotalHours").innerText=projectList[0].totalHours;
            document.getElementById("projectUsedHours").innerText=projectList[0].usedHours;
            document.getElementById("projectLeftHours").innerText=projectList[0].leftHours;
            document.getElementById("projectName_h3").innerText=projectList[0].projectName+" 已完成的进度";
            document.getElementById("totalProject").innerText=totalProject;
            for(var i=0;i<projectList.length;i++){
                var projectItem=projectList[i];
                var dom="<tr title='"+projectItem.projectCode+"' data-id='"+i+"' id='"+i+"'><td>"+projectItem.projectName+"</td></tr>";
                console.log(dom);
                $("#containter").append($(dom));
                //解决循环闭包问题
                $("#"+i).on("click",{key:i},function (event) {
                    console.log(event.data.key);
                    var tmp=projectList[event.data.key];
                    document.getElementById("projectTotalHours").innerText=tmp.totalHours;
                    document.getElementById("projectUsedHours").innerText=tmp.usedHours;
                    document.getElementById("projectLeftHours").innerText=tmp.leftHours;
                    document.getElementById("projectName_h3").innerText=tmp.projectName+" 已完成的进度";
                    element.progress('progressDemo',tmp.projectProcess+'%');
                });
            }
            for(var i=0;i<projectList.length;i++){
                var projectItem=projectList[i];
            }
        };
    });
</script>
</body>
<!--添加项目-->
<div style="display: none" id="project_add">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目名
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectName" name="projectName" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="请输入项目名">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目代号
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectCode" name="projectCode" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="请输入项目代号">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>优先级
                    </label>
                    <div class="layui-input-inline">
                        <select name="projectPriority" lay-filter="projectPriority">
                            <option value="较低">较低</option>
                            <option value="一般">一般</option>
                            <option value="较高">较高</option>
                            <option value="最高">最高</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="projectKeyword" class="layui-form-label">
                        <span class="x-red">*</span>关键字
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectKeyword" name="projectKeyword" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="请用逗号分开">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>开始日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectStartDate" name="projectStartDate" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>截止日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectEndDate" name="projectEndDate" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>每天工时
                    </label>
                    <div class="layui-input-inline">
                        <select name="projectHours" lay-filter="projectHours">
                            <option value="8" selected>8</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="x-red">*</span>项目描述</label>
                    <div class="layui-input-block">
                        <textarea id="projectDesc" name="projectDesc" class="layui-textarea" placeholder="请输入内容" required="" lay-verify="required" ></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                    </label>
                    <button  class="layui-btn layui-btn-fluid layui-btn-radius" lay-filter="create_project" lay-submit="">
                        创建
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--修改项目-->
<div style="display: none" id="project_edit">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目名
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectName_edit" name="projectName_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="请输入项目名" disabled title="项目名不允许修改">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目代号
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectCode_edit" name="projectCode_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="请输入项目代号" disabled title="项目名不允许修改">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>优先级
                    </label>
                    <div class="layui-input-inline">
                        <select name="projectPriority_edit" lay-filter="projectPriority_edit">
                            <option value="较低">较低</option>
                            <option value="一般">一般</option>
                            <option value="较高">较高</option>
                            <option value="最高">最高</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>开始日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectStartDate_edit" name="projectStartDate_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>截止日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="projectEndDate_edit" name="projectEndDate_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>每天工时
                    </label>
                    <div class="layui-input-inline">
                        <select name="projectHours_edit" lay-filter="projectHours_edit">
                            <option value="8" selected>8</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="x-red">*</span>项目描述</label>
                    <div class="layui-input-block">
                        <textarea id="projectDesc_edit" name="projectDesc_edit" class="layui-textarea" placeholder="请输入内容" required="" lay-verify="required" ></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                    </label>
                    <button  class="layui-btn layui-btn-fluid layui-btn-radius" lay-filter="edit_project" lay-submit="">
                        创建
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--添加团队-->
<div style="display: none" id="team_add">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>所属项目代号
                    </label>
                    <div class="layui-input-inline">
                        <select name="teamProject" id="teamProject" lay-verify="required" lay-filter="teamProjectSelect">
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="teamName" class="layui-form-label">
                        <span class="x-red">*</span>团队名
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="teamName" name="teamName" required="" lay-verify="required"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="x-red">*</span>团队描述</label>
                    <div class="layui-input-block">
                        <textarea id="teamDesc" name="teamDesc" class="layui-textarea" placeholder="简单的描述一下团队吧" ></textarea>
                    </div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<label class="layui-form-label">-->
                        <!--<span class="x-red">*</span>项目经理-->
                    <!--</label>-->
                    <!--<div class="layui-input-block">-->
                        <!--<select name="programerSelect" xm-select="programerSelect" xm-select-skin="default" xm-select-max="1">-->
                        <!--</select>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目开发
                    </label>
                    <div class="layui-input-block">
                        <select name="developerSelect" xm-select="developerSelect" xm-select-skin="default" xm-select-max="5">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目测试
                    </label>
                    <div class="layui-input-block">
                        <select name="testerSelect" xm-select="testerSelect" xm-select-skin="default" xm-select-max="5">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>团队状态
                    </label>
                    <div class="layui-input-inline" id="teamStatus">
                        <input type="radio" name="type" value="项目中" title="项目中" lay-filter="teamStatus" checked>
                        <input type="radio" name="type" value="非项目中" title="非项目中" lay-filter="teamStatus">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                    </label>
                    <button  class="layui-btn layui-btn-radius layui-input-inline" lay-filter="create_team" lay-submit="">
                        创建
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--修改团队-->
<div style="display: none;" id="team_edit">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>所属项目代号
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="teamProject_edit" name="teamProject_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" disabled title="项目代号不允许修改">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="teamName_edit" class="layui-form-label">
                        <span class="x-red">*</span>团队名
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="teamName_edit" name="teamName_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" disabled title="团队名不允许修改">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="x-red">*</span>团队描述</label>
                    <div class="layui-input-block">
                        <textarea id="teamDesc_edit" name="teamDesc_edit" class="layui-textarea" placeholder="简单的描述一下团队吧" ></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目经理
                    </label>
                    <div class="layui-input-block">
                        <select name="programerSelect_edit" xm-select="programerSelect_edit" xm-select-skin="default">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目开发
                    </label>
                    <div class="layui-input-block">
                        <select name="developerSelect_edit" xm-select="developerSelect_edit" xm-select-skin="default">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>项目测试
                    </label>
                    <div class="layui-input-block">
                        <select name="testerSelect_edit" xm-select="testerSelect_edit" xm-select-skin="default">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>团队状态
                    </label>
                    <div class="layui-input-inline" id="teamStatus_edit">
                        <input type="radio" name="type_edit" value="项目中" title="项目中" lay-filter="type" checked>
                        <input type="radio" name="type_edit" value="非项目中" title="非项目中" lay-filter="type">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                    </label>
                    <button  class="layui-btn layui-btn-radius layui-input-inline layui-btn-fluid" lay-filter="edit_team" lay-submit="">
                        修改
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--添加任务-->
<div style="display: none" id="task_add">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>所属项目代号
                    </label>
                    <div class="layui-input-inline">
                        <select name="taskProject" id="taskProject" lay-filter="taskProjectSelect" required lay-verify="required">
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>优先级
                    </label>
                    <div class="layui-input-inline">
                        <select name="taskPriority" id="taskPriority" lay-filter="taskPrioritySelect" required lay-verify="required">
                            <option value=""></option>
                            <option value="较低">较低</option>
                            <option value="一般">一般</option>
                            <option value="较高">较高</option>
                            <option value="最高">最高</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>当前指派
                    </label>
                    <div class="layui-input-block">
                        <select name="assginedToSelect" xm-select="assginedToSelect" required lay-verify="required" xm-select-skin="default" xm-select-max="1">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>任务标题
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="taskName" name="taskName" required="" lay-verify="required"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<label for="taskKeyword" class="layui-form-label">-->
                        <!--<span class="x-red">*</span>关键字-->
                    <!--</label>-->
                    <!--<div class="layui-input-inline">-->
                        <!--<input type="text" id="taskKeyword" name="taskKeyword" required="" lay-verify="required"-->
                               <!--autocomplete="off" class="layui-input" placeholder="请用逗号分开">-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>开始日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="taskStartDate" name="taskStartDate" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>截止日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="taskEndDate" name="taskEndDate" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
                    </div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<label class="layui-form-label">-->
                        <!--<span class="x-red">*</span>状态-->
                    <!--</label>-->
                    <!--<div class="layui-input-inline">-->
                        <!--<select name="taskStatus" id="taskStatus" lay-filter="taskStatus">-->
                            <!--<option value=""></option>-->
                            <!--<option value="1001">未开始</option>-->
                        <!--</select>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="x-red">*</span>任务描述</label>
                    <div class="layui-input-block">
                        <textarea id="taskDesc" name="taskDesc" class="layui-textarea" placeholder="请输入内容" ></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                    </label>
                    <button  class="layui-btn layui-btn-radius layui-btn-fluid" lay-filter="create_task" lay-submit="">
                        创建任务
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--修改任务-->
<div style="display: none;" id="task_edit">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form" lay-filter="example">
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>所属项目
                    </label>
                    <div class="layui-input-inline">
                        <div class="layui-input-inline">
                            <input type="text" id="taskProject_edit" name="taskProject_edit" autocomplete="off" class="layui-input" disabled title="所属项目不允许修改">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>优先级
                    </label>
                    <div class="layui-input-inline">
                        <select name="taskPriority_edit" lay-filter="taskPrioritySelect_edit" required="" lay-verify="required">
                            <option value=""></option>
                            <option value="较低">较低</option>
                            <option value="一般">一般</option>
                            <option value="较高">较高</option>
                            <option value="最高">最高</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>当前指派
                    </label>
                    <div class="layui-input-block">
                        <select name="assginedToSelect_edit" xm-select="assginedToSelect_edit" required lay-verify="required" xm-select-skin="default" xm-select-max="1">
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>任务标题
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="taskName_edit" name="taskName_edit" autocomplete="off" class="layui-input" disabled>
                    </div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<label for="taskKeyword_edit" class="layui-form-label">-->
                        <!--<span class="x-red">*</span>关键字-->
                    <!--</label>-->
                    <!--<div class="layui-input-inline">-->
                        <!--<input type="text" id="taskKeyword_edit" name="taskKeyword_edit" required="" lay-verify="required"-->
                               <!--autocomplete="off" class="layui-input" placeholder="请用逗号分开">-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>开始日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="taskStartDate_edit" name="taskStartDate_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>结束日期
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="taskEndDate_edit" name="taskEndDate_edit" required="" lay-verify="required"
                               autocomplete="off" class="layui-input" placeholder="yyyy-MM-dd HH:mm:ss">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="x-red">*</span>任务描述</label>
                    <div class="layui-input-block">
                        <textarea id="taskDesc_edit" name="taskDesc_edit" class="layui-textarea" placeholder="请输入内容" ></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                    </label>
                    <button  class="layui-btn layui-btn-radius layui-input-inline" lay-filter="edit_task" lay-submit="">
                        修改
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
</html>